#-*- coding: utf-8 -*-
'''
    Author: hkk

'''
from django.shortcuts import render,render_to_response,reverse
from django.http import HttpResponse,HttpResponseRedirect
from commons.paginator import paginator
from vmware.models import vmware_content
from django.db.models import Q

def vmware_search(request):

    data = {}
    search = request.GET.get("search")
    content = vmware_content.objects.filter(Q(vm_ip__icontains=search) | Q(vm_ower__icontains=search) | Q(vm_status__icontains=search))
    data = paginator(request, content)
    return render_to_response('vmware/vmware_table.html',data)